Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds hints how to run ltx2any on Windows. Refs #51. #61

Closed
wants to merge 1 commit into from
Closed

Adds hints how to run ltx2any on Windows. Refs #51. #61

wants to merge 1 commit into from

Conversation

koppor
Copy link
Contributor

@koppor koppor commented Oct 7, 2015

Refs #51.

@koppor koppor mentioned this pull request Oct 7, 2015
@akerbos
Copy link
Collaborator

akerbos commented Oct 8, 2015

I don't have a machine to test this, so I'll have to trust that what you do is reasonable. Some questions:

  1. Why gnuplot? It's not necessary for all documents.
  2. Why Cygwin? Is this just for the GNU binary dependencies? (iirc cat, grep and awk at the moment)
    If that's all, it's probably about time I removed these if possible.

I'm glad that it appears to mostly work on Windows out of the box?

@koppor
Copy link
Contributor Author

koppor commented Oct 10, 2015

gnuplot: if I start ltx2any.rb, I get following output

[ltx2any] Initialising ...
[ltx2any] Essential dependency gnuplot (binary) unfulfilled

[ltx2any] Shutdown

I didn't search for how to disable gnuplot via command line and I read that output that gnuplot is absolutely required. Reading your comment, it reads that the word "Essential" is not quite true there? Installing gnuplot from sourceforge makes the error disappear.

Cygwin was the easiest thing to install gnuplot and cat. If installing gnuplot and pandoc manually from the websites, I get following output

[ltx2any] Initialising ... Done
[ltx2any] Copying files to tmp ... Done
[ltx2any] PdfLaTeX(1) running ... Der Befehl "cat" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Done
[ltx2any] PdfLaTeX(2) running ... Der Befehl "cat" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Done
[ltx2any] There were 0 errors and 0 warnings.
[ltx2any] Output generated at minimal-only-document.pdf
[ltx2any] Assembling log files ... Error
          Failed to build PDF log:
          You need pandoc for PDF logs.
[ltx2any] Falling back to Markdown log ... Done
[ltx2any] Log file generated at minimal-only-document.log.md

I don't know whether cat is absolutely necessary? The produced output without the cat call reads fine. Reading your comment again: Yes, Cygwin is because of cat, grep, and awk). There should be Windows equivalents around, but difficult to install. The alternative to Cygwin is to force the users to use git for windows and have them the BASH tools added to the path (which is an installation option).

The real issue remaining is that pandoc doesn't seem to be found, even if a call in the windows command line succeeds. This might be a hint for #64.

@akerbos
Copy link
Collaborator

akerbos commented Oct 11, 2015

ad gnuplot: Oh dear. Dependency management is still a work-in-progress. Several dependencies are marked :essential in their respective extensions, which is correct: the Gnuplot extension can't work without the binary. However, it's not a dependency for the whole program. See #65; these instructions should not mention gnuplot (when #65 is fixed, at least).

cat, grep and awk are currently used to determine if the resulting PDF changed. Without them, the number of iterations of the engine will be off (always twice, apparently?). I think I can get rid of the dependency, but that'll have to wait for a free afternoon. See #66.

So, once #65 is fixed and #66 is implemented, there is no need for Cygwin, right?

@akerbos
Copy link
Collaborator

akerbos commented Oct 11, 2015

Thank you for your interest and efforts, by the way. Yours is the first real feedback I've gotten on this tool. It's deeply appreciated! :)

@koppor
Copy link
Contributor Author

koppor commented Oct 11, 2015

Yes, I'd say so. The pandoc calling issue, however, is still to be solved. pandoc is not available in cygwin and therefore I really wonder, what's going on there. 😟

You're welcome 🌟. I like to support interesting new ideas.

@akerbos
Copy link
Collaborator

akerbos commented Oct 11, 2015

What do you mean exactly; pandoc is not found when called from ltx2any, or the call fails with that error mentioned in #64?

akerbos pushed a commit that referenced this pull request Nov 18, 2015
Creates new HashManager; will encapsulate all file change management
in the future.
 * Moves creation of (partial) file hashes to a central location.
 * File hashing is now always pure Ruby (via Digest).
 * Adapts all call sites.
 * Removes dependencies on GNU tools.
@akerbos
Copy link
Collaborator

akerbos commented Jan 7, 2016

@koppor Oh, I forgot to ping you. The dependencies on GNU binaries are gone now. Can you confirm that ltx2any works under Windows (PATH issues with gnuplot and pandoc aside)?

@koppor
Copy link
Contributor Author

koppor commented Mar 18, 2016

Yes, it works without cygwin. I updated the PR accordingly.

@koppor
Copy link
Contributor Author

koppor commented Jun 5, 2016

I checked again in a fresh Windows 10 machine. No cygwin dependencies needed. When gnuplot and pandoc are installed, normal call works fine. Using -d leads to an endless loop.

@akerbos
Copy link
Collaborator

akerbos commented Jun 5, 2016

Thank you!

Changing how optional dependencies are handled is on my todo list. The goal is that runs that don't need gnuplot or pandoc execute when these tools are not installed, of course. The current situation is not specific to Windows.

What do you mean by "endless loop"? The one we expect, or something pathological? At which point?

@koppor
Copy link
Contributor Author

koppor commented Jun 5, 2016

ltx2any checks for changes and always thinks that there is a change. Further, I cannot use CTRL+c to cancel the build. Pushing it several times terminates the build process only, but not the ruby script itself. (Should I open a separate issue for that)?

I tried to replicate on ArchLinux, but I get

ERROR: undefined local variable or method `shortcode' for main:Object (see ausarbeitung.err for details)

#<NameError: undefined local variable or method `shortcode' for main:Object>

../ltx2any/ltx2any.rb:190:in `rescue in <main>'
../ltx2any/ltx2any.rb:185:in `<main>'%   

ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Is there a quick fix or should I open a separate iusse?

@koppor
Copy link
Contributor Author

koppor commented Jun 10, 2016

Think, my issue described above does not influence the Windows installation description.

The described endless loop affects a complex template only. With Springer's LNCS template, C:\Ruby22-x64\bin\ruby ..\..\ltx2any\ltx2any.rb -d paper works fine. The only issue I still have, that CTRL+c does not cancel the job. Follow up on #82.

@akerbos
Copy link
Collaborator

akerbos commented Jun 13, 2016

ltx2any checks for changes and always thinks that there is a change.

sigh I'm using the listen gem pretty much as a black box. Restructuring the code and making it up to date with their latest version is on my todo list; other than that there's little I can do, I'm afraid. :/

#<NameError: undefined local variable or method `shortcode' for main:Object>

  ../ltx2any/ltx2any.rb:190:in `rescue in <main>'
  ../ltx2any/ltx2any.rb:185:in `<main>'%   

In the current revision, there is no such variable in the whole of ltx2any.rb. Please confirm that you are running the latest version.

@akerbos
Copy link
Collaborator

akerbos commented Jun 13, 2016

Anyway, since all Windows-specific issues seem to have been resolved for now, I'm closing this. If the issue you're having with shortcode persist, please open a new bug report. Thank you for your ongoing feedback!

@akerbos akerbos closed this Jun 13, 2016
@koppor
Copy link
Contributor Author

koppor commented Jun 13, 2016

Is it possible to include the provided installation hints for windows (8611473) in the README.md? This was the intention of this pull request. It is intended for users just installing the LaTeX environment and which do not want to do trial and error. This starts with the choose of the ruby distribution etc. I wanted to lower the border for Windows users with this PR.

@akerbos
Copy link
Collaborator

akerbos commented Jun 14, 2016

Done, thank you!

@akerbos akerbos added this to the Release 1.0 milestone Jun 14, 2016
@akerbos akerbos self-assigned this Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants